<template>
  <div id="app">
    <Layout>
    <navigation-bar></navigation-bar>
    <Content>
    <router-view></router-view>
    </Content>
    </Layout>
  </div>
</template>

<script>
import NavigationBar from "./components/NavigationBar.vue";
export default {
  name: "App",
  components: { "navigation-bar": NavigationBar },
  beforeCreate(){
    if(_isMobile())
    {
      window.location.href = '/index_mobile.html#/'
    }
  }
};
function _isMobile() {
  let flag = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)
  return flag;
}
</script>

<style scoped>
#app {
  font-family: "Avenir", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}
</style>
